﻿namespace Hidistro.ControlPanel.Store
{
    using Hidistro.Entities;
    using Hidistro.SqlDal.Store;
    using System;

    public static class APPHelper
    {
        public static bool AddAppInstallRecord(AppInstallRecordInfo appInstallRecord)
        {
            return new AppVersionRecordDao().AddAppInstallRecord(appInstallRecord);
        }

        public static bool AddAppVersionRecord(AppVersionRecordInfo appVersionRecord)
        {
            return new AppVersionRecordDao().AddAppVersionRecord(appVersionRecord);
        }

        public static AppVersionRecordInfo GetLatestAppVersionRecord(string device)
        {
            return new AppVersionRecordDao().GetLatestAppVersionRecord(device);
        }

        public static bool IsForcibleUpgrade(string device, decimal version)
        {
            return new AppVersionRecordDao().IsForcibleUpgrade(device, version);
        }
    }
}

